<template>
  <div style="text-align:left">
    <el-menu router :default-active="selectActive" :collapse="isCollapse">
      <DBMenuItem :items="navDatas"></DBMenuItem>
    </el-menu>
  </div>
</template>

<script>
import DBMenuItem from "./MenuItem";
export default {
  name: "DBSimpleMenu",
  props: ["navDatas", "isCollapse"],
  data() {
    return {
      selectActive:"/dashbord",
      navDataTpl: [
        {
          id: "1",
          index: "1",
          title: "测试1",
          icon: "",
          childs: [
            {
              id: "1-1",
              index: "",
              title: "孩子1",
              url: "",
              icon: ""
            }
          ]
        }
      ]
    };
  },
  mounted(){
    this.selectActive = this.$route.path;
  },
  components: { DBMenuItem }
};
</script>

<style scoped>
</style>